package me.zhengjie.config.enums;

public enum TemplateEnum {

    CHILD_ZHUANYE("test_type_06","2","child-zhuanye","儿童专业版"),

    CHILD_JISU("test_type_07","2","child-jisu","儿童极速版"),

    CHENREN_ZHUANYE("test_type_06","1","chenren-zhuanye","成人专业版"),

    CHENREN_JISU("test_type_07","1","chenren-jisu","成人极速版"),
    ;

    TemplateEnum(String type, String ageType, String templateName,String title) {
        this.type = type;
        this.ageType = ageType;
        this.templateName = templateName;
        this.title = title;
    }

    public static String getTemplateTitle(String type,String ageType) {
        TemplateEnum[] list = TemplateEnum.values();
        for(TemplateEnum templateEnum : list){
            if(templateEnum.getType().equals(type) && templateEnum.getAgeType().equals(ageType)){
                return templateEnum.getTitle();
            }
        }
        return null;
    }

    public static String getTemplate(String type,String ageType) {
        TemplateEnum[] list = TemplateEnum.values();
        for(TemplateEnum templateEnum : list){
            if(templateEnum.getType().equals(type) && templateEnum.getAgeType().equals(ageType)){
                return templateEnum.getTemplateName();
            }
        }
        return null;
    }

    private String type;

    private String ageType;

    private String templateName;

    private String title;


    public String getType() {
        return type;
    }

    public String getAgeType() {
        return ageType;
    }

    public String getTemplateName() {
        return templateName;
    }

    public String getTitle() {
        return title;
    }
}
